import time
from datetime import datetime, timedelta
from pydantic import BaseModel,Field
EXPIREAT =30 * 24 * 60 * 60
ACCESS_TOKEN = "{user_id}_access_token"
KDL_URL="https://dev.kdlapi.com"
AUTH_KDL_URL="https://auth.kdlapi.com"
BASE_URL = "https://yuyue.tamgw.beijing.gov.cn"
SEND_SMS_URL = f"{BASE_URL}/api-system/send_sms/send?_={int(time.time()*1000)}" #发送验证码
OAUTH_URL = f"{BASE_URL}/api-uaa/oauth/mobile/sms/token"
GET_INFO_RRL = f"{BASE_URL}/api-user/user/current?_={int(time.time()*1000)}"
GET_PROXY_AUAHORIZATION = f"{KDL_URL}/api/getproxyauthorization"

GET_SECRER_TOKEN = f"{AUTH_KDL_URL}/api/get_secret_token"
GET_ORDEER_INFO = f"{KDL_URL}/api/getorderinfo"

ACCOUNT_PROXY = f"{KDL_URL}/api/getaccountbalance"
CACHE_PROXY = "proxy_{secret_id}"
PROXY_TOKEN = "proxy_token_{secret_id}"
class Account(BaseModel):
    userId:str = Field(...)
    username:str = Field(...)
    userMobile:str = Field(...)
    is_authenticated:bool = True
